/**
 * 选择课程
 * @param selectType input类型 radio checkbox
 * @param type 选择课程用途 1.普通选择课程(含套餐) 2.套餐选择课程，3.直播课程
 * @param packageId 套餐id
 * @param classId
 * @param subjectIds 专业ids
 * @param courseTypeKey 课程类型
 * @param callback 回调方法
 */
function selectCourse(params) {
    if(typeof params.selectType=='undefined'){
        params.selectType = '';
    }
    if(typeof params.packageId=='undefined'){
        params.packageId = 0;
    }
    if(typeof params.classId=='undefined'){
        params.classId = 0;
    }
    if(typeof params.subjectIds=='undefined'){
        params.subjectIds ='';
    }
    if(typeof params.courseTypeKey=='undefined'){
        params.courseTypeKey ='';
    }
    parent.layer.open({
        type: 2,
        area: winArea,
        btn: ['选择', '取消'],
        content: baseloaction + "/admin/course/cou/selectCourseList?selectType=" + params.selectType + "&type=" + params.type + "&packageId=" + params.packageId + "&classId=" + params.classId + '&subjectIds=' + params.subjectIds + '&courseTypeKey=' +params.courseTypeKey,
        maxmin: true,
        shade: [0.3, '#000'],
        shadeClose: false,
        title: '选择课程',
        yes: function (index, layero) {
            var _iframe = layero.find("iframe:visible");
            var iframeName = _iframe[0].name;
            var course = parent.frames[iframeName].getSelectCourse();
            if (course) {
                var currentIframeName = contentMainIframeName();
                parent.frames[currentIframeName][params.callback](course);
                parent.layer.close(index);
            }
        }
    });
}